|
|
Hello,
Let's say I do the following, so what I end up with is two 4-sided CSG objects
somewhere in space. Now, using cylinders like the ones below, I'd like to
connect the 4 corners of the first CSG object to the 4 corners of the second,
but I can't figure out how to do it. Any thoughts?
#declare Smooth = finish {specular 0.3 roughness 0.05}
#declare BondWidth = 0.1;
#declare atoms = rgb < 0, 0, 0.5 >;
#declare bonds = rgb < 0.3, 0.3, 0.3 >;
#declare C =
sphere {
<0.0, 0.0, 0.0>, 0.4
texture {
pigment {colour atoms}
finish {Smooth}
}
}
#declare A1 = < 0, 0, 0 >;
#declare A2 = < 1, 0, 0 >;
#declare A3 = < 1 ,1, 0 >;
#declare A4 = < 0, 1, 0 >;
//CSG object 1
union {
object {
C
translate A1
}
object {
C
translate A2
}
object {
C
translate A3
}
object {
C
translate A4
}
cylinder {
A1,
A2,
BondWidth
pigment {colour bonds}
finish {Smooth}
}
cylinder {
A2,
A3,
BondWidth
pigment {colour bonds}
finish {Smooth}
}
cylinder {
A3,
A4,
BondWidth
pigment {colour bonds}
finish {Smooth}
}
cylinder {
A4,
A1,
BondWidth
pigment {colour bonds}
finish {Smooth}
}
rotate SOME_ROTATE_VECTOR
translate SOME_TRANSLATE_VECTOR
}
//CSG object 2
union {
object {
C
translate A1
}
object {
C
translate A2
}
object {
C
translate A3
}
object {
C
translate A4
}
cylinder {
A1,
A2,
BondWidth
pigment {colour bonds}
finish {Smooth}
}
cylinder {
A2,
A3,
BondWidth
pigment {colour bonds}
finish {Smooth}
}
cylinder {
A3,
A4,
BondWidth
pigment {colour bonds}
finish {Smooth}
}
cylinder {
A4,
A1,
BondWidth
pigment {colour bonds}
finish {Smooth}
}
rotate SOME_OTHER_ROTATE_VECTOR
translate SOME_OTHER_TRANSLATE_VECTOR
}
Post a reply to this message
|
|